package com.ict.ms.realTime.service.dao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.ict.ms.realTime.facade.dto.RealAreaParams;
import com.ict.ms.realTime.facade.model.AppointTarget;
import com.ict.ms.realTime.facade.model.FuseTargetFromSource;
import com.ict.ms.realTime.facade.model.GridShips;
import com.ict.ms.realTime.facade.model.RealTimeMMSI;
import com.ict.ms.realTime.facade.model.ShipBaseInfo;
import com.ict.ms.realTime.facade.model.TypeCount;

import java.util.List;


/**
 * Created by chenlong on 2016/6/21.
 */
@Repository
public interface IRealTimeMMSIDao {
    //获取融合模式实时目标
    List<RealTimeMMSI> getFuseDegInfo(@Param("areaParam") RealAreaParams areaParam);

    //实时重点目标
    List<RealTimeMMSI> getFuseImTargetWithouLimit();

    //获取原始模式实时目标
    List<RealTimeMMSI> getOriginDegInfo(@Param("areaParam") RealAreaParams areaParam);

    //获取融合模式指定船舶实时目标
    AppointTarget getFuseAppointTarget(@Param("num") int num);

    //获取原始模式指定船舶实时目标
    AppointTarget getOriginAppointTarget(@Param("num") int num, @Param("source") int source,@Param("type") int type);

    //获取实时目标列表
    List<AppointTarget> realTimeTargetGet();

    /**
     * 实时区域统计
     */
    List<TypeCount> getSquFuseAreaCount(@Param("country") String country,
                                        @Param("ldlon") double ldlon, @Param("ldlat") double ldlat, @Param("rulon") double rulon, @Param("rulat") double rulat);

    List<TypeCount> getSquEleFuseAreaCount(@Param("ldlon") double ldlon, @Param("ldlat") double ldlat, @Param("rulon") double rulon, @Param("rulat") double rulat);

    int fuseAreaCount(@Param("ldlon") double ldlon, @Param("ldlat") double ldlat, @Param("rulon") double rulon, @Param("rulat") double rulat);

    List<TypeCount> getSquOrigAreaCount(@Param("country") String country, @Param("ldlon") double ldlon, @Param("ldlat") double ldlat, @Param("rulon") double rulon, @Param("rulat") double rulat);

    List<TypeCount> getSquEleOrigAreaCount(@Param("ldlon") double ldlon, @Param("ldlat") double ldlat, @Param("rulon") double rulon, @Param("rulat") double rulat);

    int origAreaCount(@Param("ldlon") double ldlon, @Param("ldlat") double ldlat, @Param("rulon") double rulon, @Param("rulat") double rulat);

    List<FuseTargetFromSource> getListOrigTargetByFuse(@Param("num1") int num1);

    ShipBaseInfo getOrigListShipBaseInfo(@Param("shipid") int shipid, @Param("shiptype") int shiptype);

    List<GridShips> getFuseGridShipsLimit(@Param("timeout") Integer timeout);

    List<GridShips> getOrigGridShipsLimit(@Param("timeout") Integer timeout);

    List<GridShips> getFuseGridShips();

    List<GridShips> getOrigGridShips();

    //获取0模式消批时间为0
    List<RealTimeMMSI> getFuseDegInfotime0(@Param("areaParam") RealAreaParams realAreaParams);

    List<RealTimeMMSI> getFuseImTargetLimit(@Param("lim") int lim);

    //获取1模式消批时间为X
    List<RealTimeMMSI> getOriginDegInfo0(@Param("areaParam") RealAreaParams realAreaParams);

    List<AppointTarget> getFuseWarShips(@Param("mmsi") int mmsi);
    List<FuseTargetFromSource> getListWarShipsByFuse(@Param("mmsi") int mmsi);
}
